'This is a snippet for zipping files with the WinZip executable. It expects an array of file names, their directory and the name you want the zip file named as parameters. It then loops through each file adding them to your zip file

'Provide an array of file names, their directories and the name you want the zip file named


Private Sub ZipFileWithWinZip(ByRef files() As String, ByRef dir As String, ByRef zipFileName As String)
    'Change this to your path for Winzip
    Const EXE_LOCATION As String = """" & "C:\Program Files\WinZip\wzzip" & """"
    Dim cmd As String
    Dim i As Integer
    
    If Right$(dir, 1) <> "\" Then dir = dir & "\"

    'Now we need to work through the array of files
    For i = 1 To UBound(info)
        'Zip the current file
        cmd = EXE_LOCATION & " " & zipFileName & " " & files(i)
        Debug.Print cmd
        
        'Check the status of the zip process
        If Shell(cmd, vbHide) = 0 Then
        'See if they want to continue
            If MsgBox("Zip Failed for " & files(i) & vbCrLf & "Continue?", vbExclamation Or vbYesNo, "Zip Error") = vbNo Then
                Exit For
            End If
        End If
        
        'Move to the next file
    Next i

    MsgBox "All files zipped", vbInformation, "Zip Process Complete", vbOK
End Sub